{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "55822295",
   "metadata": {},
   "source": [
    "![Finance Toolkit](https://github.com/JerBouma/FinanceToolkit/assets/46355364/198d47bd-e1b3-492d-acc4-5d9f02d1d009)\n",
    "\n",
    "**The FinanceToolkit** is an open-source toolkit in which all relevant financial ratios (100+), indicators and performance measurements are written down in the most simplistic way allowing for complete transparency of the calculation method. This allows you to not have to rely on metrics from other providers and, given a financial statement, allow for efficient manual calculations. This leads to one uniform method of calculation being applied that is available and understood by everyone."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2937a8f2",
   "metadata": {},
   "source": [
    "# Installation\n",
    "To install the FinanceToolkit it simply requires the following:\n",
    "\n",
    "```\n",
    "pip install financetoolkit -U\n",
    "```\n",
    "\n",
    "From within Python use:\n",
    "\n",
    "```python\n",
    "from financetoolkit import Toolkit\n",
    "```\n",
    " \n",
    "To be able to get started, you need to obtain an API Key from FinancialModelingPrep. This is used to gain access to 30+ years of financial statement both annually and quarterly. Note that the Free plan is limited to 250 requests each day, 5 years of data and only features companies listed on US exchanges.\n",
    "\n",
    "___ \n",
    "\n",
    "<b><div align=\"center\">Obtain an API Key from FinancialModelingPrep <a href=\"https://www.jeroenbouma.com/fmp\" target=\"_blank\">here</a>.</div></b>\n",
    "___\n",
    "\n",
    "Through the link you are able to subscribe for the free plan and also premium plans at a **15% discount**. This is an affiliate link and thus supports the project at the same time. I have chosen FinancialModelingPrep as a source as I find it to be the most transparent, reliable and at an affordable price. When you notice that data is inaccurate or have any other issue related to the data, note that I simply provide the means to access this data and I am not responsible for the accuracy of the data itself. For this, use <a href=\"https://site.financialmodelingprep.com/contact\" target=\"_blank\">their contact form</a> or provide the data yourself. \n",
    "\n",
    "The current Notebook is revolved around the Model class. If you are interested in the other modules, you can find the related Notebooks below. **Please view the documentation <a href=\"https://www.jeroenbouma.comhttps://www.jeroenbouma.com/projects/financetoolkit/docs/models\" target=\"_blank\">here</a> to find all the available models.**\n",
    "\n",
    "<style>\n",
    ".button {\n",
    "  color: #fff !important;\n",
    "  background-color: #58abc4;\n",
    "  display: inline-block;\n",
    "  margin-bottom: 0.25em;\n",
    "  padding: 0.5em 1em;\n",
    "  font-family: -apple-system,BlinkMacSystemFont,\"Roboto\",\"Segoe UI\",\"Helvetica Neue\",\"Lucida Grande\",Arial,sans-serif;\n",
    "  font-size: .75em;\n",
    "  font-weight: bold;\n",
    "  text-align: center;\n",
    "  text-decoration: none;\n",
    "  border-width: 0;\n",
    "  border-radius: 4px;\n",
    "  cursor: pointer;\n",
    "}\n",
    "\n",
    ".button-current {\n",
    "  background-color: #d67f05;\n",
    "}\n",
    "\n",
    "a:hover {\n",
    "  color: #fff !important;\n",
    "  font-weight: normal !important;\n",
    "}\n",
    "</style>\n",
    "\n",
    "<div style=\"display: flex; justify-content: space-between;\" class=\"show-on-desktop\">\n",
    "    <a href=\"https://www.jeroenbouma.com/projects/financetoolkit//getting-started\" target=\"_blank\" class=\"button\" style=\"flex: 1;margin-right:5px\"\">Toolkit</a>\n",
    "    <a href=\"https://www.jeroenbouma.com/projects/financetoolkit//discovery-module\" target=\"_blank\" class=\"button\" style=\"flex: 1;margin-right:5px\">Discovery</a>\n",
    "    <a href=\"https://www.jeroenbouma.com/projects/financetoolkit//ratios-module\" target=\"_blank\" class=\"button\" style=\"flex: 1;margin-right:5px\">Ratios</a>\n",
    "    <a href=\"https://www.jeroenbouma.com/projects/financetoolkit//models-module\" target=\"_blank\" class=\"button button-current\" style=\"flex: 1;margin-right:5px\">Models</a>\n",
    "    <a href=\"https://www.jeroenbouma.com/projects/financetoolkit//options-module\" target=\"_blank\" class=\"button\" style=\"flex: 1;margin-right:5px\">Options</a>\n",
    "    <a href=\"https://www.jeroenbouma.com/projects/financetoolkit//technicals-module\" target=\"_blank\" class=\"button\" style=\"flex: 1;margin-right:5px\">Technicals</a>\n",
    "    <a href=\"https://www.jeroenbouma.com/projects/financetoolkit//risk-module\" target=\"_blank\" class=\"button\" style=\"flex: 1;margin-right:5px\">Risk</a>\n",
    "    <a href=\"https://www.jeroenbouma.com/projects/financetoolkit//performance-module\" target=\"_blank\" class=\"button\" style=\"flex: 1;margin-right:5px\">Performance</a>\n",
    "    <a href=\"https://www.jeroenbouma.com/projects/financetoolkit//economics-module\"  target=\"_blank\" class=\"button\" style=\"flex: 1;margin-right:5px\">Economics</a>\n",
    "    <a href=\"https://www.jeroenbouma.com/projects/financetoolkit//fixed-income-module\" target=\"_blank\" class=\"button\" style=\"flex: 1;margin-right:5px\">Fixed income</a>\n",
    "    <a href=\"https://www.jeroenbouma.com/projects/financetoolkit//portfolio-module\" target=\"_blank\" class=\"button\" style=\"flex: 1; \">Portfolio</a>\n",
    "</div>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "11269a00",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "from financetoolkit import Toolkit\n",
    "\n",
    "API_KEY = \"FINANCIAL_MODELING_PREP_API_KEY\""
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "a3f7fc24",
   "metadata": {},
   "source": [
    "**Initializing only is required once.** This is the case for any function so once you have obtained a balance sheet statement, it will be stored accordingly which means that requests to FinancialModelingPrep, the source used in these examples, are kept to a minimum. Note that in this example annual data is used but by adding `quarterly=True` to the Toolkit initialization, quarterly data can also be collected. Note that this requires a Premium subscription from FMP."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "b3507cb1",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Initialize the Toolkit with company tickers\n",
    "companies = Toolkit(\n",
    "    [\"AAPL\", \"TSLA\", \"META\", \"AMZN\"], api_key=API_KEY, start_date=\"2005-01-01\"\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "id": "e4ed8f92",
   "metadata": {},
   "source": [
    "After initialization of `Toolkit`, you can get access to the Models module which includes a variety of well-known models. This can be done by calling the `models` property. For example, it is possible to perform an (extended) Dupont analysis for each company."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "dcb94679",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Obtaining financial statements: 100%|██████████| 3/3 [00:04<00:00,  1.37s/it]\n",
      "Obtaining historical data: 100%|██████████| 5/5 [00:00<00:00,  9.34it/s]\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>2005</th>\n",
       "      <th>2006</th>\n",
       "      <th>2007</th>\n",
       "      <th>2008</th>\n",
       "      <th>2009</th>\n",
       "      <th>2010</th>\n",
       "      <th>2011</th>\n",
       "      <th>2012</th>\n",
       "      <th>2013</th>\n",
       "      <th>2014</th>\n",
       "      <th>2015</th>\n",
       "      <th>2016</th>\n",
       "      <th>2017</th>\n",
       "      <th>2018</th>\n",
       "      <th>2019</th>\n",
       "      <th>2020</th>\n",
       "      <th>2021</th>\n",
       "      <th>2022</th>\n",
       "      <th>2023</th>\n",
       "      <th>2024</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"6\" valign=\"top\">AAPL</th>\n",
       "      <th>Interest Burden Ratio</th>\n",
       "      <td>0.9087</td>\n",
       "      <td>0.8705</td>\n",
       "      <td>0.8804</td>\n",
       "      <td>0.9101</td>\n",
       "      <td>0.973</td>\n",
       "      <td>0.9916</td>\n",
       "      <td>0.9879</td>\n",
       "      <td>0.9906</td>\n",
       "      <td>0.977</td>\n",
       "      <td>0.9817</td>\n",
       "      <td>0.9823</td>\n",
       "      <td>0.978</td>\n",
       "      <td>0.9572</td>\n",
       "      <td>0.9725</td>\n",
       "      <td>0.9725</td>\n",
       "      <td>0.988</td>\n",
       "      <td>0.9976</td>\n",
       "      <td>1.0028</td>\n",
       "      <td>1.005</td>\n",
       "      <td>0.9978</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Tax Burden Ratio</th>\n",
       "      <td>0.8083</td>\n",
       "      <td>0.8108</td>\n",
       "      <td>0.7927</td>\n",
       "      <td>0.7704</td>\n",
       "      <td>0.7014</td>\n",
       "      <td>0.7622</td>\n",
       "      <td>0.7672</td>\n",
       "      <td>0.7555</td>\n",
       "      <td>0.7559</td>\n",
       "      <td>0.7525</td>\n",
       "      <td>0.7496</td>\n",
       "      <td>0.7611</td>\n",
       "      <td>0.7882</td>\n",
       "      <td>0.8397</td>\n",
       "      <td>0.8643</td>\n",
       "      <td>0.8661</td>\n",
       "      <td>0.869</td>\n",
       "      <td>0.8356</td>\n",
       "      <td>0.8486</td>\n",
       "      <td>0.7607</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Operating Profit Margin</th>\n",
       "      <td>0.1298</td>\n",
       "      <td>0.1459</td>\n",
       "      <td>0.2086</td>\n",
       "      <td>0.2123</td>\n",
       "      <td>0.2812</td>\n",
       "      <td>0.2842</td>\n",
       "      <td>0.316</td>\n",
       "      <td>0.3563</td>\n",
       "      <td>0.2935</td>\n",
       "      <td>0.2926</td>\n",
       "      <td>0.3103</td>\n",
       "      <td>0.2846</td>\n",
       "      <td>0.2796</td>\n",
       "      <td>0.2745</td>\n",
       "      <td>0.2527</td>\n",
       "      <td>0.2444</td>\n",
       "      <td>0.2985</td>\n",
       "      <td>0.302</td>\n",
       "      <td>0.2967</td>\n",
       "      <td>0.3158</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Asset Turnover</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1.345</td>\n",
       "      <td>1.1283</td>\n",
       "      <td>1.0559</td>\n",
       "      <td>1.0256</td>\n",
       "      <td>1.0633</td>\n",
       "      <td>1.1302</td>\n",
       "      <td>1.0704</td>\n",
       "      <td>0.8923</td>\n",
       "      <td>0.8331</td>\n",
       "      <td>0.8951</td>\n",
       "      <td>0.7047</td>\n",
       "      <td>0.6578</td>\n",
       "      <td>0.7168</td>\n",
       "      <td>0.7389</td>\n",
       "      <td>0.8288</td>\n",
       "      <td>1.0841</td>\n",
       "      <td>1.1206</td>\n",
       "      <td>1.0868</td>\n",
       "      <td>1.0899</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Equity Multiplier</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1.6495</td>\n",
       "      <td>1.7357</td>\n",
       "      <td>1.6704</td>\n",
       "      <td>1.5513</td>\n",
       "      <td>1.5445</td>\n",
       "      <td>1.5397</td>\n",
       "      <td>1.501</td>\n",
       "      <td>1.5845</td>\n",
       "      <td>1.8666</td>\n",
       "      <td>2.2615</td>\n",
       "      <td>2.4718</td>\n",
       "      <td>2.6573</td>\n",
       "      <td>3.0724</td>\n",
       "      <td>3.5633</td>\n",
       "      <td>4.2509</td>\n",
       "      <td>5.255</td>\n",
       "      <td>6.1862</td>\n",
       "      <td>6.252</td>\n",
       "      <td>6.0251</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Return on Equity</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.2285</td>\n",
       "      <td>0.2851</td>\n",
       "      <td>0.2625</td>\n",
       "      <td>0.3054</td>\n",
       "      <td>0.3528</td>\n",
       "      <td>0.4167</td>\n",
       "      <td>0.4284</td>\n",
       "      <td>0.3064</td>\n",
       "      <td>0.3361</td>\n",
       "      <td>0.4625</td>\n",
       "      <td>0.369</td>\n",
       "      <td>0.3687</td>\n",
       "      <td>0.4936</td>\n",
       "      <td>0.5592</td>\n",
       "      <td>0.7369</td>\n",
       "      <td>1.4744</td>\n",
       "      <td>1.7546</td>\n",
       "      <td>1.7195</td>\n",
       "      <td>1.5741</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"6\" valign=\"top\">AMZN</th>\n",
       "      <th>Interest Burden Ratio</th>\n",
       "      <td>1.0093</td>\n",
       "      <td>1.0318</td>\n",
       "      <td>0.9924</td>\n",
       "      <td>0.9345</td>\n",
       "      <td>0.9724</td>\n",
       "      <td>0.9392</td>\n",
       "      <td>0.9229</td>\n",
       "      <td>1.2426</td>\n",
       "      <td>1.7126</td>\n",
       "      <td>-1.6036</td>\n",
       "      <td>1.4444</td>\n",
       "      <td>1.1467</td>\n",
       "      <td>1.08</td>\n",
       "      <td>1.1021</td>\n",
       "      <td>1.0415</td>\n",
       "      <td>0.9465</td>\n",
       "      <td>0.6521</td>\n",
       "      <td>-2.0633</td>\n",
       "      <td>0.9812</td>\n",
       "      <td>1.0012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Tax Burden Ratio</th>\n",
       "      <td>0.831</td>\n",
       "      <td>0.4884</td>\n",
       "      <td>0.7267</td>\n",
       "      <td>0.766</td>\n",
       "      <td>0.7989</td>\n",
       "      <td>0.8193</td>\n",
       "      <td>0.732</td>\n",
       "      <td>-0.0577</td>\n",
       "      <td>0.3678</td>\n",
       "      <td>-1.3539</td>\n",
       "      <td>0.2669</td>\n",
       "      <td>0.5447</td>\n",
       "      <td>0.7387</td>\n",
       "      <td>0.811</td>\n",
       "      <td>0.7969</td>\n",
       "      <td>0.9315</td>\n",
       "      <td>1.3411</td>\n",
       "      <td>-0.2222</td>\n",
       "      <td>0.8256</td>\n",
       "      <td>0.8638</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Operating Profit Margin</th>\n",
       "      <td>0.0504</td>\n",
       "      <td>0.0352</td>\n",
       "      <td>0.0445</td>\n",
       "      <td>0.047</td>\n",
       "      <td>0.0474</td>\n",
       "      <td>0.0438</td>\n",
       "      <td>0.0194</td>\n",
       "      <td>0.0089</td>\n",
       "      <td>0.0058</td>\n",
       "      <td>-0.0012</td>\n",
       "      <td>0.0144</td>\n",
       "      <td>0.0279</td>\n",
       "      <td>0.0214</td>\n",
       "      <td>0.0484</td>\n",
       "      <td>0.0498</td>\n",
       "      <td>0.0627</td>\n",
       "      <td>0.0812</td>\n",
       "      <td>-0.0115</td>\n",
       "      <td>0.0653</td>\n",
       "      <td>0.1074</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Asset Turnover</th>\n",
       "      <td>NaN</td>\n",
       "      <td>2.6581</td>\n",
       "      <td>2.7351</td>\n",
       "      <td>2.5902</td>\n",
       "      <td>2.2153</td>\n",
       "      <td>2.0978</td>\n",
       "      <td>2.1816</td>\n",
       "      <td>2.1127</td>\n",
       "      <td>2.0478</td>\n",
       "      <td>1.8801</td>\n",
       "      <td>1.7946</td>\n",
       "      <td>1.8358</td>\n",
       "      <td>1.6568</td>\n",
       "      <td>1.5845</td>\n",
       "      <td>1.4464</td>\n",
       "      <td>1.413</td>\n",
       "      <td>1.2668</td>\n",
       "      <td>1.1639</td>\n",
       "      <td>1.1606</td>\n",
       "      <td>1.1068</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Equity Multiplier</th>\n",
       "      <td>NaN</td>\n",
       "      <td>11.904</td>\n",
       "      <td>6.6634</td>\n",
       "      <td>3.825</td>\n",
       "      <td>2.7906</td>\n",
       "      <td>2.6904</td>\n",
       "      <td>3.0145</td>\n",
       "      <td>3.6261</td>\n",
       "      <td>4.0536</td>\n",
       "      <td>4.6207</td>\n",
       "      <td>4.9431</td>\n",
       "      <td>4.5348</td>\n",
       "      <td>4.5689</td>\n",
       "      <td>4.1253</td>\n",
       "      <td>3.6729</td>\n",
       "      <td>3.5149</td>\n",
       "      <td>3.202</td>\n",
       "      <td>3.1068</td>\n",
       "      <td>2.847</td>\n",
       "      <td>2.3629</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Return on Equity</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.5613</td>\n",
       "      <td>0.5848</td>\n",
       "      <td>0.3334</td>\n",
       "      <td>0.2275</td>\n",
       "      <td>0.1901</td>\n",
       "      <td>0.0863</td>\n",
       "      <td>-0.0049</td>\n",
       "      <td>0.0305</td>\n",
       "      <td>-0.0235</td>\n",
       "      <td>0.0494</td>\n",
       "      <td>0.1452</td>\n",
       "      <td>0.1291</td>\n",
       "      <td>0.2827</td>\n",
       "      <td>0.2195</td>\n",
       "      <td>0.2744</td>\n",
       "      <td>0.2881</td>\n",
       "      <td>-0.0191</td>\n",
       "      <td>0.1749</td>\n",
       "      <td>0.2429</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"6\" valign=\"top\">META</th>\n",
       "      <th>Interest Burden Ratio</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.9185</td>\n",
       "      <td>0.9821</td>\n",
       "      <td>1.0315</td>\n",
       "      <td>1.0238</td>\n",
       "      <td>1.036</td>\n",
       "      <td>1.0891</td>\n",
       "      <td>1.0182</td>\n",
       "      <td>1.0171</td>\n",
       "      <td>1.005</td>\n",
       "      <td>0.9927</td>\n",
       "      <td>0.981</td>\n",
       "      <td>0.9823</td>\n",
       "      <td>0.9667</td>\n",
       "      <td>0.9847</td>\n",
       "      <td>0.9888</td>\n",
       "      <td>1.0043</td>\n",
       "      <td>0.9857</td>\n",
       "      <td>0.9818</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Tax Burden Ratio</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.1129</td>\n",
       "      <td>1.0182</td>\n",
       "      <td>0.4656</td>\n",
       "      <td>0.3895</td>\n",
       "      <td>0.5695</td>\n",
       "      <td>0.0985</td>\n",
       "      <td>0.535</td>\n",
       "      <td>0.5887</td>\n",
       "      <td>0.5924</td>\n",
       "      <td>0.8222</td>\n",
       "      <td>0.7887</td>\n",
       "      <td>0.8875</td>\n",
       "      <td>0.7707</td>\n",
       "      <td>0.8921</td>\n",
       "      <td>0.8421</td>\n",
       "      <td>0.8015</td>\n",
       "      <td>0.8363</td>\n",
       "      <td>0.8988</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Operating Profit Margin</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.8824</td>\n",
       "      <td>-0.2059</td>\n",
       "      <td>0.3269</td>\n",
       "      <td>0.5106</td>\n",
       "      <td>0.4568</td>\n",
       "      <td>0.0971</td>\n",
       "      <td>0.3498</td>\n",
       "      <td>0.3939</td>\n",
       "      <td>0.3455</td>\n",
       "      <td>0.4529</td>\n",
       "      <td>0.5066</td>\n",
       "      <td>0.4542</td>\n",
       "      <td>0.351</td>\n",
       "      <td>0.386</td>\n",
       "      <td>0.401</td>\n",
       "      <td>0.2471</td>\n",
       "      <td>0.3516</td>\n",
       "      <td>0.4296</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Asset Turnover</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.7963</td>\n",
       "      <td>0.4749</td>\n",
       "      <td>0.4771</td>\n",
       "      <td>0.4293</td>\n",
       "      <td>0.4002</td>\n",
       "      <td>0.4833</td>\n",
       "      <td>0.5439</td>\n",
       "      <td>0.6141</td>\n",
       "      <td>0.6129</td>\n",
       "      <td>0.5874</td>\n",
       "      <td>0.725</td>\n",
       "      <td>0.6631</td>\n",
       "      <td>0.6496</td>\n",
       "      <td>0.6506</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Equity Multiplier</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.3201</td>\n",
       "      <td>1.287</td>\n",
       "      <td>1.212</td>\n",
       "      <td>1.1263</td>\n",
       "      <td>1.1155</td>\n",
       "      <td>1.1059</td>\n",
       "      <td>1.1194</td>\n",
       "      <td>1.1476</td>\n",
       "      <td>1.2459</td>\n",
       "      <td>1.2762</td>\n",
       "      <td>1.2849</td>\n",
       "      <td>1.4035</td>\n",
       "      <td>1.4893</td>\n",
       "      <td>1.5059</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Return on Equity</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.2832</td>\n",
       "      <td>0.0064</td>\n",
       "      <td>0.1102</td>\n",
       "      <td>0.114</td>\n",
       "      <td>0.0918</td>\n",
       "      <td>0.1976</td>\n",
       "      <td>0.2386</td>\n",
       "      <td>0.279</td>\n",
       "      <td>0.1996</td>\n",
       "      <td>0.2542</td>\n",
       "      <td>0.311</td>\n",
       "      <td>0.1852</td>\n",
       "      <td>0.2804</td>\n",
       "      <td>0.3714</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"6\" valign=\"top\">TSLA</th>\n",
       "      <th>Interest Burden Ratio</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0192</td>\n",
       "      <td>1.0242</td>\n",
       "      <td>0.9494</td>\n",
       "      <td>0.9315</td>\n",
       "      <td>0.9525</td>\n",
       "      <td>0.9904</td>\n",
       "      <td>0.9955</td>\n",
       "      <td>0.858</td>\n",
       "      <td>0.6559</td>\n",
       "      <td>0.8184</td>\n",
       "      <td>0.8941</td>\n",
       "      <td>0.7388</td>\n",
       "      <td>0.3861</td>\n",
       "      <td>0.1038</td>\n",
       "      <td>1.7279</td>\n",
       "      <td>1.0284</td>\n",
       "      <td>0.9954</td>\n",
       "      <td>0.8915</td>\n",
       "      <td>0.7871</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Tax Burden Ratio</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.9844</td>\n",
       "      <td>0.9778</td>\n",
       "      <td>1.0545</td>\n",
       "      <td>1.0741</td>\n",
       "      <td>1.051</td>\n",
       "      <td>1.0116</td>\n",
       "      <td>1.0049</td>\n",
       "      <td>1.2077</td>\n",
       "      <td>1.575</td>\n",
       "      <td>1.2401</td>\n",
       "      <td>1.0113</td>\n",
       "      <td>1.2022</td>\n",
       "      <td>2.5155</td>\n",
       "      <td>12.6087</td>\n",
       "      <td>0.346</td>\n",
       "      <td>0.8482</td>\n",
       "      <td>0.9215</td>\n",
       "      <td>1.687</td>\n",
       "      <td>1.0076</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Operating Profit Margin</th>\n",
       "      <td>NaN</td>\n",
       "      <td>-inf</td>\n",
       "      <td>-1069.137</td>\n",
       "      <td>-5.6088</td>\n",
       "      <td>-0.4977</td>\n",
       "      <td>-1.3205</td>\n",
       "      <td>-1.2432</td>\n",
       "      <td>-0.9584</td>\n",
       "      <td>-0.0355</td>\n",
       "      <td>-0.089</td>\n",
       "      <td>-0.2164</td>\n",
       "      <td>-0.1066</td>\n",
       "      <td>-0.1879</td>\n",
       "      <td>-0.0468</td>\n",
       "      <td>-0.0271</td>\n",
       "      <td>0.0366</td>\n",
       "      <td>0.1178</td>\n",
       "      <td>0.1684</td>\n",
       "      <td>0.1031</td>\n",
       "      <td>0.092</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Asset Turnover</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.3407</td>\n",
       "      <td>1.2293</td>\n",
       "      <td>0.4521</td>\n",
       "      <td>0.3715</td>\n",
       "      <td>0.4522</td>\n",
       "      <td>1.1404</td>\n",
       "      <td>0.7756</td>\n",
       "      <td>0.5822</td>\n",
       "      <td>0.4556</td>\n",
       "      <td>0.4583</td>\n",
       "      <td>0.735</td>\n",
       "      <td>0.7675</td>\n",
       "      <td>0.7295</td>\n",
       "      <td>0.942</td>\n",
       "      <td>1.1277</td>\n",
       "      <td>1.0243</td>\n",
       "      <td>0.8544</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Equity Multiplier</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.2725</td>\n",
       "      <td>-0.4018</td>\n",
       "      <td>-11.1136</td>\n",
       "      <td>2.5506</td>\n",
       "      <td>5.2406</td>\n",
       "      <td>4.4595</td>\n",
       "      <td>5.2239</td>\n",
       "      <td>6.9653</td>\n",
       "      <td>4.3973</td>\n",
       "      <td>4.4481</td>\n",
       "      <td>4.8886</td>\n",
       "      <td>4.4408</td>\n",
       "      <td>2.7197</td>\n",
       "      <td>2.0679</td>\n",
       "      <td>1.8646</td>\n",
       "      <td>1.7255</td>\n",
       "      <td>1.6657</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Return on Equity</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.5214</td>\n",
       "      <td>0.246</td>\n",
       "      <td>6.6413</td>\n",
       "      <td>-1.1803</td>\n",
       "      <td>-2.2722</td>\n",
       "      <td>-0.1869</td>\n",
       "      <td>-0.3725</td>\n",
       "      <td>-0.8907</td>\n",
       "      <td>-0.1931</td>\n",
       "      <td>-0.3401</td>\n",
       "      <td>-0.1634</td>\n",
       "      <td>-0.1206</td>\n",
       "      <td>0.0434</td>\n",
       "      <td>0.2002</td>\n",
       "      <td>0.3248</td>\n",
       "      <td>0.2739</td>\n",
       "      <td>0.1039</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "date                           2005   2006      2007    2008    2009     2010  \\\n",
       "AAPL Interest Burden Ratio   0.9087 0.8705    0.8804  0.9101   0.973   0.9916   \n",
       "     Tax Burden Ratio        0.8083 0.8108    0.7927  0.7704  0.7014   0.7622   \n",
       "     Operating Profit Margin 0.1298 0.1459    0.2086  0.2123  0.2812   0.2842   \n",
       "     Asset Turnover             NaN  1.345    1.1283  1.0559  1.0256   1.0633   \n",
       "     Equity Multiplier          NaN 1.6495    1.7357  1.6704  1.5513   1.5445   \n",
       "     Return on Equity           NaN 0.2285    0.2851  0.2625  0.3054   0.3528   \n",
       "AMZN Interest Burden Ratio   1.0093 1.0318    0.9924  0.9345  0.9724   0.9392   \n",
       "     Tax Burden Ratio         0.831 0.4884    0.7267   0.766  0.7989   0.8193   \n",
       "     Operating Profit Margin 0.0504 0.0352    0.0445   0.047  0.0474   0.0438   \n",
       "     Asset Turnover             NaN 2.6581    2.7351  2.5902  2.2153   2.0978   \n",
       "     Equity Multiplier          NaN 11.904    6.6634   3.825  2.7906   2.6904   \n",
       "     Return on Equity           NaN 0.5613    0.5848  0.3334  0.2275   0.1901   \n",
       "META Interest Burden Ratio      NaN    NaN    0.9185  0.9821  1.0315   1.0238   \n",
       "     Tax Burden Ratio           NaN    NaN    1.1129  1.0182  0.4656   0.3895   \n",
       "     Operating Profit Margin    NaN    NaN   -0.8824 -0.2059  0.3269   0.5106   \n",
       "     Asset Turnover             NaN    NaN       NaN     NaN     NaN      NaN   \n",
       "     Equity Multiplier          NaN    NaN       NaN     NaN     NaN      NaN   \n",
       "     Return on Equity           NaN    NaN       NaN     NaN     NaN      NaN   \n",
       "TSLA Interest Burden Ratio      NaN 1.0192    1.0242  0.9494  0.9315   0.9525   \n",
       "     Tax Burden Ratio           NaN 0.9844    0.9778  1.0545  1.0741    1.051   \n",
       "     Operating Profit Margin    NaN   -inf -1069.137 -5.6088 -0.4977  -1.3205   \n",
       "     Asset Turnover             NaN    NaN       NaN  0.3407  1.2293   0.4521   \n",
       "     Equity Multiplier          NaN    NaN       NaN -0.2725 -0.4018 -11.1136   \n",
       "     Return on Equity           NaN    NaN       NaN  0.5214   0.246   6.6413   \n",
       "\n",
       "date                            2011    2012    2013    2014    2015    2016  \\\n",
       "AAPL Interest Burden Ratio    0.9879  0.9906   0.977  0.9817  0.9823   0.978   \n",
       "     Tax Burden Ratio         0.7672  0.7555  0.7559  0.7525  0.7496  0.7611   \n",
       "     Operating Profit Margin   0.316  0.3563  0.2935  0.2926  0.3103  0.2846   \n",
       "     Asset Turnover           1.1302  1.0704  0.8923  0.8331  0.8951  0.7047   \n",
       "     Equity Multiplier        1.5397   1.501  1.5845  1.8666  2.2615  2.4718   \n",
       "     Return on Equity         0.4167  0.4284  0.3064  0.3361  0.4625   0.369   \n",
       "AMZN Interest Burden Ratio    0.9229  1.2426  1.7126 -1.6036  1.4444  1.1467   \n",
       "     Tax Burden Ratio          0.732 -0.0577  0.3678 -1.3539  0.2669  0.5447   \n",
       "     Operating Profit Margin  0.0194  0.0089  0.0058 -0.0012  0.0144  0.0279   \n",
       "     Asset Turnover           2.1816  2.1127  2.0478  1.8801  1.7946  1.8358   \n",
       "     Equity Multiplier        3.0145  3.6261  4.0536  4.6207  4.9431  4.5348   \n",
       "     Return on Equity         0.0863 -0.0049  0.0305 -0.0235  0.0494  0.1452   \n",
       "META Interest Burden Ratio     1.036  1.0891  1.0182  1.0171   1.005  0.9927   \n",
       "     Tax Burden Ratio         0.5695  0.0985   0.535  0.5887  0.5924  0.8222   \n",
       "     Operating Profit Margin  0.4568  0.0971  0.3498  0.3939  0.3455  0.4529   \n",
       "     Asset Turnover           0.7963  0.4749  0.4771  0.4293  0.4002  0.4833   \n",
       "     Equity Multiplier        1.3201   1.287   1.212  1.1263  1.1155  1.1059   \n",
       "     Return on Equity         0.2832  0.0064  0.1102   0.114  0.0918  0.1976   \n",
       "TSLA Interest Burden Ratio    0.9904  0.9955   0.858  0.6559  0.8184  0.8941   \n",
       "     Tax Burden Ratio         1.0116  1.0049  1.2077   1.575  1.2401  1.0113   \n",
       "     Operating Profit Margin -1.2432 -0.9584 -0.0355  -0.089 -0.2164 -0.1066   \n",
       "     Asset Turnover           0.3715  0.4522  1.1404  0.7756  0.5822  0.4556   \n",
       "     Equity Multiplier        2.5506  5.2406  4.4595  5.2239  6.9653  4.3973   \n",
       "     Return on Equity        -1.1803 -2.2722 -0.1869 -0.3725 -0.8907 -0.1931   \n",
       "\n",
       "date                            2017    2018    2019   2020   2021    2022  \\\n",
       "AAPL Interest Burden Ratio    0.9572  0.9725  0.9725  0.988 0.9976  1.0028   \n",
       "     Tax Burden Ratio         0.7882  0.8397  0.8643 0.8661  0.869  0.8356   \n",
       "     Operating Profit Margin  0.2796  0.2745  0.2527 0.2444 0.2985   0.302   \n",
       "     Asset Turnover           0.6578  0.7168  0.7389 0.8288 1.0841  1.1206   \n",
       "     Equity Multiplier        2.6573  3.0724  3.5633 4.2509  5.255  6.1862   \n",
       "     Return on Equity         0.3687  0.4936  0.5592 0.7369 1.4744  1.7546   \n",
       "AMZN Interest Burden Ratio      1.08  1.1021  1.0415 0.9465 0.6521 -2.0633   \n",
       "     Tax Burden Ratio         0.7387   0.811  0.7969 0.9315 1.3411 -0.2222   \n",
       "     Operating Profit Margin  0.0214  0.0484  0.0498 0.0627 0.0812 -0.0115   \n",
       "     Asset Turnover           1.6568  1.5845  1.4464  1.413 1.2668  1.1639   \n",
       "     Equity Multiplier        4.5689  4.1253  3.6729 3.5149  3.202  3.1068   \n",
       "     Return on Equity         0.1291  0.2827  0.2195 0.2744 0.2881 -0.0191   \n",
       "META Interest Burden Ratio     0.981  0.9823  0.9667 0.9847 0.9888  1.0043   \n",
       "     Tax Burden Ratio         0.7887  0.8875  0.7707 0.8921 0.8421  0.8015   \n",
       "     Operating Profit Margin  0.5066  0.4542   0.351  0.386  0.401  0.2471   \n",
       "     Asset Turnover           0.5439  0.6141  0.6129 0.5874  0.725  0.6631   \n",
       "     Equity Multiplier        1.1194  1.1476  1.2459 1.2762 1.2849  1.4035   \n",
       "     Return on Equity         0.2386   0.279  0.1996 0.2542  0.311  0.1852   \n",
       "TSLA Interest Burden Ratio    0.7388  0.3861  0.1038 1.7279 1.0284  0.9954   \n",
       "     Tax Burden Ratio         1.2022  2.5155 12.6087  0.346 0.8482  0.9215   \n",
       "     Operating Profit Margin -0.1879 -0.0468 -0.0271 0.0366 0.1178  0.1684   \n",
       "     Asset Turnover           0.4583   0.735  0.7675 0.7295  0.942  1.1277   \n",
       "     Equity Multiplier        4.4481  4.8886  4.4408 2.7197 2.0679  1.8646   \n",
       "     Return on Equity        -0.3401 -0.1634 -0.1206 0.0434 0.2002  0.3248   \n",
       "\n",
       "date                           2023   2024  \n",
       "AAPL Interest Burden Ratio    1.005 0.9978  \n",
       "     Tax Burden Ratio        0.8486 0.7607  \n",
       "     Operating Profit Margin 0.2967 0.3158  \n",
       "     Asset Turnover          1.0868 1.0899  \n",
       "     Equity Multiplier        6.252 6.0251  \n",
       "     Return on Equity        1.7195 1.5741  \n",
       "AMZN Interest Burden Ratio   0.9812 1.0012  \n",
       "     Tax Burden Ratio        0.8256 0.8638  \n",
       "     Operating Profit Margin 0.0653 0.1074  \n",
       "     Asset Turnover          1.1606 1.1068  \n",
       "     Equity Multiplier        2.847 2.3629  \n",
       "     Return on Equity        0.1749 0.2429  \n",
       "META Interest Burden Ratio   0.9857 0.9818  \n",
       "     Tax Burden Ratio        0.8363 0.8988  \n",
       "     Operating Profit Margin 0.3516 0.4296  \n",
       "     Asset Turnover          0.6496 0.6506  \n",
       "     Equity Multiplier       1.4893 1.5059  \n",
       "     Return on Equity        0.2804 0.3714  \n",
       "TSLA Interest Burden Ratio   0.8915 0.7871  \n",
       "     Tax Burden Ratio         1.687 1.0076  \n",
       "     Operating Profit Margin 0.1031  0.092  \n",
       "     Asset Turnover          1.0243 0.8544  \n",
       "     Equity Multiplier       1.7255 1.6657  \n",
       "     Return on Equity        0.2739 0.1039  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "companies.models.get_extended_dupont_analysis()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "591e52e3",
   "metadata": {},
   "source": [
    "Showing the growth is possible with the `growth=True` parameter which also includes a lag parameter in which 1 is the default. It is also possible to define multiple lags. As an example:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "2b6f9a09",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Please note that the Cost of Debt contains Inf. This is due to Total Debt being 0, therefore Cost of Debt is adjusted to 0 for those periods.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>2005</th>\n",
       "      <th>2006</th>\n",
       "      <th>2007</th>\n",
       "      <th>2008</th>\n",
       "      <th>2009</th>\n",
       "      <th>2010</th>\n",
       "      <th>2011</th>\n",
       "      <th>2012</th>\n",
       "      <th>2013</th>\n",
       "      <th>2014</th>\n",
       "      <th>2015</th>\n",
       "      <th>2016</th>\n",
       "      <th>2017</th>\n",
       "      <th>2018</th>\n",
       "      <th>2019</th>\n",
       "      <th>2020</th>\n",
       "      <th>2021</th>\n",
       "      <th>2022</th>\n",
       "      <th>2023</th>\n",
       "      <th>2024</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">AAPL</th>\n",
       "      <th rowspan=\"3\" valign=\"top\">Market Value Equity</th>\n",
       "      <th>Lag 1</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.2074</td>\n",
       "      <td>1.3646</td>\n",
       "      <td>-0.5624</td>\n",
       "      <td>1.4822</td>\n",
       "      <td>0.5597</td>\n",
       "      <td>0.2714</td>\n",
       "      <td>0.3269</td>\n",
       "      <td>0.0389</td>\n",
       "      <td>0.293</td>\n",
       "      <td>-0.0977</td>\n",
       "      <td>0.0447</td>\n",
       "      <td>0.395</td>\n",
       "      <td>-0.1125</td>\n",
       "      <td>0.7306</td>\n",
       "      <td>0.7038</td>\n",
       "      <td>0.2876</td>\n",
       "      <td>-0.2917</td>\n",
       "      <td>0.4352</td>\n",
       "      <td>0.2674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Lag 2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.855</td>\n",
       "      <td>0.0348</td>\n",
       "      <td>0.0863</td>\n",
       "      <td>2.8716</td>\n",
       "      <td>0.9831</td>\n",
       "      <td>0.687</td>\n",
       "      <td>0.3785</td>\n",
       "      <td>0.3433</td>\n",
       "      <td>0.1666</td>\n",
       "      <td>-0.0574</td>\n",
       "      <td>0.4573</td>\n",
       "      <td>0.238</td>\n",
       "      <td>0.5359</td>\n",
       "      <td>1.9485</td>\n",
       "      <td>1.1938</td>\n",
       "      <td>-0.088</td>\n",
       "      <td>0.0166</td>\n",
       "      <td>0.819</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Lag 3</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.2495</td>\n",
       "      <td>1.5686</td>\n",
       "      <td>0.6943</td>\n",
       "      <td>3.9223</td>\n",
       "      <td>1.6313</td>\n",
       "      <td>0.7527</td>\n",
       "      <td>0.7824</td>\n",
       "      <td>0.212</td>\n",
       "      <td>0.2188</td>\n",
       "      <td>0.3149</td>\n",
       "      <td>0.2934</td>\n",
       "      <td>1.1425</td>\n",
       "      <td>1.6168</td>\n",
       "      <td>2.7964</td>\n",
       "      <td>0.5539</td>\n",
       "      <td>0.309</td>\n",
       "      <td>0.2884</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">Market Value Debt</th>\n",
       "      <th>Lag 1</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>inf</td>\n",
       "      <td>1.0811</td>\n",
       "      <td>0.8226</td>\n",
       "      <td>0.3529</td>\n",
       "      <td>0.3292</td>\n",
       "      <td>-0.0103</td>\n",
       "      <td>-0.0562</td>\n",
       "      <td>0.1317</td>\n",
       "      <td>0.1165</td>\n",
       "      <td>-0.0296</td>\n",
       "      <td>-0.0645</td>\n",
       "      <td>-0.0393</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Lag 2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>inf</td>\n",
       "      <td>inf</td>\n",
       "      <td>2.7929</td>\n",
       "      <td>1.4658</td>\n",
       "      <td>0.7983</td>\n",
       "      <td>0.3154</td>\n",
       "      <td>-0.066</td>\n",
       "      <td>0.0681</td>\n",
       "      <td>0.2635</td>\n",
       "      <td>0.0834</td>\n",
       "      <td>-0.0922</td>\n",
       "      <td>-0.1013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"5\" valign=\"top\">TSLA</th>\n",
       "      <th rowspan=\"2\" valign=\"top\">Corporate Tax Rate</th>\n",
       "      <th>Lag 2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.6497</td>\n",
       "      <td>-0.6689</td>\n",
       "      <td>-0.0434</td>\n",
       "      <td>3.1267</td>\n",
       "      <td>-0.694</td>\n",
       "      <td>17.8148</td>\n",
       "      <td>95.2196</td>\n",
       "      <td>-0.589</td>\n",
       "      <td>0.0827</td>\n",
       "      <td>-0.0272</td>\n",
       "      <td>0.6133</td>\n",
       "      <td>10.4187</td>\n",
       "      <td>-5.3844</td>\n",
       "      <td>-1.6662</td>\n",
       "      <td>-0.6739</td>\n",
       "      <td>-5.5504</td>\n",
       "      <td>1.4764</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Lag 3</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.8607</td>\n",
       "      <td>-0.2037</td>\n",
       "      <td>0.6416</td>\n",
       "      <td>-0.2642</td>\n",
       "      <td>31.2864</td>\n",
       "      <td>16.1559</td>\n",
       "      <td>42.3678</td>\n",
       "      <td>-0.0127</td>\n",
       "      <td>-0.5615</td>\n",
       "      <td>2.8756</td>\n",
       "      <td>3.6242</td>\n",
       "      <td>-18.4672</td>\n",
       "      <td>-2.9095</td>\n",
       "      <td>-1.4988</td>\n",
       "      <td>-2.9818</td>\n",
       "      <td>0.8542</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">Weighted Average Cost of Capital</th>\n",
       "      <th>Lag 1</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-1.0582</td>\n",
       "      <td>-35.3771</td>\n",
       "      <td>0.8238</td>\n",
       "      <td>-0.4389</td>\n",
       "      <td>-1.0394</td>\n",
       "      <td>-13.4448</td>\n",
       "      <td>1.3202</td>\n",
       "      <td>-1.3168</td>\n",
       "      <td>-5.8273</td>\n",
       "      <td>-0.3812</td>\n",
       "      <td>1.4433</td>\n",
       "      <td>-1.7403</td>\n",
       "      <td>-2.3434</td>\n",
       "      <td>0.0052</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Lag 2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.0002</td>\n",
       "      <td>-63.696</td>\n",
       "      <td>0.0234</td>\n",
       "      <td>-1.0221</td>\n",
       "      <td>-0.5101</td>\n",
       "      <td>-29.875</td>\n",
       "      <td>-1.7351</td>\n",
       "      <td>0.5295</td>\n",
       "      <td>-3.987</td>\n",
       "      <td>0.5118</td>\n",
       "      <td>-2.8089</td>\n",
       "      <td>-0.0054</td>\n",
       "      <td>-2.3504</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Lag 3</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.6479</td>\n",
       "      <td>-36.1803</td>\n",
       "      <td>-1.0403</td>\n",
       "      <td>-0.7251</td>\n",
       "      <td>0.1368</td>\n",
       "      <td>8.1487</td>\n",
       "      <td>2.5488</td>\n",
       "      <td>-0.0536</td>\n",
       "      <td>-8.2979</td>\n",
       "      <td>-2.1193</td>\n",
       "      <td>1.4301</td>\n",
       "      <td>-0.0002</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>72 rows × 20 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                             2005   2006   2007    2008  \\\n",
       "AAPL Market Value Equity              Lag 1   NaN 0.2074 1.3646 -0.5624   \n",
       "                                      Lag 2   NaN    NaN  1.855  0.0348   \n",
       "                                      Lag 3   NaN    NaN    NaN  0.2495   \n",
       "     Market Value Debt                Lag 1   NaN    NaN    NaN     NaN   \n",
       "                                      Lag 2   NaN    NaN    NaN     NaN   \n",
       "...                                           ...    ...    ...     ...   \n",
       "TSLA Corporate Tax Rate               Lag 2   NaN    NaN    NaN -0.6497   \n",
       "                                      Lag 3   NaN    NaN    NaN     NaN   \n",
       "     Weighted Average Cost of Capital Lag 1   NaN    NaN    NaN     NaN   \n",
       "                                      Lag 2   NaN    NaN    NaN     NaN   \n",
       "                                      Lag 3   NaN    NaN    NaN     NaN   \n",
       "\n",
       "                                               2009    2010    2011     2012  \\\n",
       "AAPL Market Value Equity              Lag 1  1.4822  0.5597  0.2714   0.3269   \n",
       "                                      Lag 2  0.0863  2.8716  0.9831    0.687   \n",
       "                                      Lag 3  1.5686  0.6943  3.9223   1.6313   \n",
       "     Market Value Debt                Lag 1     NaN     NaN     NaN      NaN   \n",
       "                                      Lag 2     NaN     NaN     NaN      NaN   \n",
       "...                                             ...     ...     ...      ...   \n",
       "TSLA Corporate Tax Rate               Lag 2 -0.6689 -0.0434  3.1267   -0.694   \n",
       "                                      Lag 3 -0.8607 -0.2037  0.6416  -0.2642   \n",
       "     Weighted Average Cost of Capital Lag 1     NaN     NaN -1.0582 -35.3771   \n",
       "                                      Lag 2     NaN     NaN     NaN   1.0002   \n",
       "                                      Lag 3     NaN     NaN     NaN      NaN   \n",
       "\n",
       "                                               2013     2014    2015     2016  \\\n",
       "AAPL Market Value Equity              Lag 1  0.0389    0.293 -0.0977   0.0447   \n",
       "                                      Lag 2  0.3785   0.3433  0.1666  -0.0574   \n",
       "                                      Lag 3  0.7527   0.7824   0.212   0.2188   \n",
       "     Market Value Debt                Lag 1     inf   1.0811  0.8226   0.3529   \n",
       "                                      Lag 2     inf      inf  2.7929   1.4658   \n",
       "...                                             ...      ...     ...      ...   \n",
       "TSLA Corporate Tax Rate               Lag 2 17.8148  95.2196  -0.589   0.0827   \n",
       "                                      Lag 3 31.2864  16.1559 42.3678  -0.0127   \n",
       "     Weighted Average Cost of Capital Lag 1  0.8238  -0.4389 -1.0394 -13.4448   \n",
       "                                      Lag 2 -63.696   0.0234 -1.0221  -0.5101   \n",
       "                                      Lag 3  2.6479 -36.1803 -1.0403  -0.7251   \n",
       "\n",
       "                                               2017    2018    2019     2020  \\\n",
       "AAPL Market Value Equity              Lag 1   0.395 -0.1125  0.7306   0.7038   \n",
       "                                      Lag 2  0.4573   0.238  0.5359   1.9485   \n",
       "                                      Lag 3  0.3149  0.2934  1.1425   1.6168   \n",
       "     Market Value Debt                Lag 1  0.3292 -0.0103 -0.0562   0.1317   \n",
       "                                      Lag 2  0.7983  0.3154  -0.066   0.0681   \n",
       "...                                             ...     ...     ...      ...   \n",
       "TSLA Corporate Tax Rate               Lag 2 -0.0272  0.6133 10.4187  -5.3844   \n",
       "                                      Lag 3 -0.5615  2.8756  3.6242 -18.4672   \n",
       "     Weighted Average Cost of Capital Lag 1  1.3202 -1.3168 -5.8273  -0.3812   \n",
       "                                      Lag 2 -29.875 -1.7351  0.5295   -3.987   \n",
       "                                      Lag 3  0.1368  8.1487  2.5488  -0.0536   \n",
       "\n",
       "                                               2021    2022    2023    2024  \n",
       "AAPL Market Value Equity              Lag 1  0.2876 -0.2917  0.4352  0.2674  \n",
       "                                      Lag 2  1.1938  -0.088  0.0166   0.819  \n",
       "                                      Lag 3  2.7964  0.5539   0.309  0.2884  \n",
       "     Market Value Debt                Lag 1  0.1165 -0.0296 -0.0645 -0.0393  \n",
       "                                      Lag 2  0.2635  0.0834 -0.0922 -0.1013  \n",
       "...                                             ...     ...     ...     ...  \n",
       "TSLA Corporate Tax Rate               Lag 2 -1.6662 -0.6739 -5.5504  1.4764  \n",
       "                                      Lag 3 -2.9095 -1.4988 -2.9818  0.8542  \n",
       "     Weighted Average Cost of Capital Lag 1  1.4433 -1.7403 -2.3434  0.0052  \n",
       "                                      Lag 2  0.5118 -2.8089 -0.0054 -2.3504  \n",
       "                                      Lag 3 -8.2979 -2.1193  1.4301 -0.0002  \n",
       "\n",
       "[72 rows x 20 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "companies.models.get_weighted_average_cost_of_capital(growth=True, lag=[1, 2, 3])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4344155e",
   "metadata": {},
   "source": [
    "Other than that, there are many other models such as the Altman Z-Score and the Piotrivski F-Score."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "2fbd68b6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2005</th>\n",
       "      <th>2006</th>\n",
       "      <th>2007</th>\n",
       "      <th>2008</th>\n",
       "      <th>2009</th>\n",
       "      <th>2010</th>\n",
       "      <th>2011</th>\n",
       "      <th>2012</th>\n",
       "      <th>2013</th>\n",
       "      <th>2014</th>\n",
       "      <th>2015</th>\n",
       "      <th>2016</th>\n",
       "      <th>2017</th>\n",
       "      <th>2018</th>\n",
       "      <th>2019</th>\n",
       "      <th>2020</th>\n",
       "      <th>2021</th>\n",
       "      <th>2022</th>\n",
       "      <th>2023</th>\n",
       "      <th>2024</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Working Capital to Total Assets</th>\n",
       "      <td>0.2787</td>\n",
       "      <td>0.1928</td>\n",
       "      <td>0.2236</td>\n",
       "      <td>0.1697</td>\n",
       "      <td>0.1761</td>\n",
       "      <td>0.1795</td>\n",
       "      <td>0.1026</td>\n",
       "      <td>0.0705</td>\n",
       "      <td>0.041</td>\n",
       "      <td>0.0594</td>\n",
       "      <td>0.0281</td>\n",
       "      <td>0.0236</td>\n",
       "      <td>0.0176</td>\n",
       "      <td>0.0413</td>\n",
       "      <td>0.0378</td>\n",
       "      <td>0.0198</td>\n",
       "      <td>0.0459</td>\n",
       "      <td>-0.0186</td>\n",
       "      <td>0.0141</td>\n",
       "      <td>0.0183</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Retained Earnings to Total Assets</th>\n",
       "      <td>-0.5484</td>\n",
       "      <td>-0.421</td>\n",
       "      <td>-0.212</td>\n",
       "      <td>-0.0878</td>\n",
       "      <td>0.0125</td>\n",
       "      <td>0.0704</td>\n",
       "      <td>0.0773</td>\n",
       "      <td>0.0589</td>\n",
       "      <td>0.0545</td>\n",
       "      <td>0.0358</td>\n",
       "      <td>0.0393</td>\n",
       "      <td>0.0589</td>\n",
       "      <td>0.0658</td>\n",
       "      <td>0.1207</td>\n",
       "      <td>0.1386</td>\n",
       "      <td>0.1636</td>\n",
       "      <td>0.2043</td>\n",
       "      <td>0.1798</td>\n",
       "      <td>0.2152</td>\n",
       "      <td>0.2766</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>EBIT to Total Assets</th>\n",
       "      <td>0.1477</td>\n",
       "      <td>0.1043</td>\n",
       "      <td>0.1136</td>\n",
       "      <td>0.1158</td>\n",
       "      <td>0.0861</td>\n",
       "      <td>0.0821</td>\n",
       "      <td>0.039</td>\n",
       "      <td>0.0148</td>\n",
       "      <td>0.0143</td>\n",
       "      <td>0.0025</td>\n",
       "      <td>0.031</td>\n",
       "      <td>0.0513</td>\n",
       "      <td>0.0354</td>\n",
       "      <td>0.078</td>\n",
       "      <td>0.0691</td>\n",
       "      <td>0.0805</td>\n",
       "      <td>0.095</td>\n",
       "      <td>-0.0077</td>\n",
       "      <td>0.0772</td>\n",
       "      <td>0.1135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Market Value to Total Liabilities</th>\n",
       "      <td>5.8282</td>\n",
       "      <td>4.2486</td>\n",
       "      <td>7.4248</td>\n",
       "      <td>3.9203</td>\n",
       "      <td>6.9534</td>\n",
       "      <td>6.8784</td>\n",
       "      <td>4.5519</td>\n",
       "      <td>4.6633</td>\n",
       "      <td>6.0975</td>\n",
       "      <td>3.2768</td>\n",
       "      <td>6.276</td>\n",
       "      <td>5.66</td>\n",
       "      <td>5.5648</td>\n",
       "      <td>6.3057</td>\n",
       "      <td>5.7069</td>\n",
       "      <td>7.2921</td>\n",
       "      <td>6.0829</td>\n",
       "      <td>2.7031</td>\n",
       "      <td>4.8904</td>\n",
       "      <td>6.9398</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Sales to Total Assets</th>\n",
       "      <td>2.2971</td>\n",
       "      <td>2.455</td>\n",
       "      <td>2.2876</td>\n",
       "      <td>2.3053</td>\n",
       "      <td>1.7743</td>\n",
       "      <td>1.8197</td>\n",
       "      <td>1.9019</td>\n",
       "      <td>1.8766</td>\n",
       "      <td>1.8539</td>\n",
       "      <td>1.6327</td>\n",
       "      <td>1.6527</td>\n",
       "      <td>1.6305</td>\n",
       "      <td>1.3546</td>\n",
       "      <td>1.4318</td>\n",
       "      <td>1.2454</td>\n",
       "      <td>1.202</td>\n",
       "      <td>1.1172</td>\n",
       "      <td>1.1109</td>\n",
       "      <td>1.0889</td>\n",
       "      <td>1.0209</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Altman Z-Score</th>\n",
       "      <td>5.8481</td>\n",
       "      <td>4.9901</td>\n",
       "      <td>7.089</td>\n",
       "      <td>5.1204</td>\n",
       "      <td>6.4592</td>\n",
       "      <td>6.5317</td>\n",
       "      <td>4.9933</td>\n",
       "      <td>4.8903</td>\n",
       "      <td>5.6852</td>\n",
       "      <td>3.7283</td>\n",
       "      <td>5.6092</td>\n",
       "      <td>5.3067</td>\n",
       "      <td>4.9235</td>\n",
       "      <td>5.6911</td>\n",
       "      <td>5.1369</td>\n",
       "      <td>6.0955</td>\n",
       "      <td>5.4216</td>\n",
       "      <td>2.9367</td>\n",
       "      <td>4.596</td>\n",
       "      <td>5.9686</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                     2005   2006   2007    2008   2009   2010  \\\n",
       "Working Capital to Total Assets    0.2787 0.1928 0.2236  0.1697 0.1761 0.1795   \n",
       "Retained Earnings to Total Assets -0.5484 -0.421 -0.212 -0.0878 0.0125 0.0704   \n",
       "EBIT to Total Assets               0.1477 0.1043 0.1136  0.1158 0.0861 0.0821   \n",
       "Market Value to Total Liabilities  5.8282 4.2486 7.4248  3.9203 6.9534 6.8784   \n",
       "Sales to Total Assets              2.2971  2.455 2.2876  2.3053 1.7743 1.8197   \n",
       "Altman Z-Score                     5.8481 4.9901  7.089  5.1204 6.4592 6.5317   \n",
       "\n",
       "                                    2011   2012   2013   2014   2015   2016  \\\n",
       "Working Capital to Total Assets   0.1026 0.0705  0.041 0.0594 0.0281 0.0236   \n",
       "Retained Earnings to Total Assets 0.0773 0.0589 0.0545 0.0358 0.0393 0.0589   \n",
       "EBIT to Total Assets               0.039 0.0148 0.0143 0.0025  0.031 0.0513   \n",
       "Market Value to Total Liabilities 4.5519 4.6633 6.0975 3.2768  6.276   5.66   \n",
       "Sales to Total Assets             1.9019 1.8766 1.8539 1.6327 1.6527 1.6305   \n",
       "Altman Z-Score                    4.9933 4.8903 5.6852 3.7283 5.6092 5.3067   \n",
       "\n",
       "                                    2017   2018   2019   2020   2021    2022  \\\n",
       "Working Capital to Total Assets   0.0176 0.0413 0.0378 0.0198 0.0459 -0.0186   \n",
       "Retained Earnings to Total Assets 0.0658 0.1207 0.1386 0.1636 0.2043  0.1798   \n",
       "EBIT to Total Assets              0.0354  0.078 0.0691 0.0805  0.095 -0.0077   \n",
       "Market Value to Total Liabilities 5.5648 6.3057 5.7069 7.2921 6.0829  2.7031   \n",
       "Sales to Total Assets             1.3546 1.4318 1.2454  1.202 1.1172  1.1109   \n",
       "Altman Z-Score                    4.9235 5.6911 5.1369 6.0955 5.4216  2.9367   \n",
       "\n",
       "                                    2023   2024  \n",
       "Working Capital to Total Assets   0.0141 0.0183  \n",
       "Retained Earnings to Total Assets 0.2152 0.2766  \n",
       "EBIT to Total Assets              0.0772 0.1135  \n",
       "Market Value to Total Liabilities 4.8904 6.9398  \n",
       "Sales to Total Assets             1.0889 1.0209  \n",
       "Altman Z-Score                     4.596 5.9686  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>date</th>\n",
       "      <th>2006</th>\n",
       "      <th>2007</th>\n",
       "      <th>2008</th>\n",
       "      <th>2009</th>\n",
       "      <th>2010</th>\n",
       "      <th>2011</th>\n",
       "      <th>2012</th>\n",
       "      <th>2013</th>\n",
       "      <th>2014</th>\n",
       "      <th>2015</th>\n",
       "      <th>2016</th>\n",
       "      <th>2017</th>\n",
       "      <th>2018</th>\n",
       "      <th>2019</th>\n",
       "      <th>2020</th>\n",
       "      <th>2021</th>\n",
       "      <th>2022</th>\n",
       "      <th>2023</th>\n",
       "      <th>2024</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Return on Assets Criteria</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Operating Cashflow Criteria</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Change in Return on Assets Criteria</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Accruals Criteria</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Change in Leverage Criteria</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Change in Current Ratio Criteria</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Number of Shares Criteria</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Gross Margin Criteria</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Asset Turnover Criteria</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Piotroski Score</th>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "date                                 2006  2007  2008  2009  2010  2011  2012  \\\n",
       "Return on Assets Criteria               1     1     1     1     1     1     1   \n",
       "Operating Cashflow Criteria             1     1     1     1     1     1     1   \n",
       "Change in Return on Assets Criteria     0     0     0     1     0     1     0   \n",
       "Accruals Criteria                       0     1     1     1     1     1     1   \n",
       "Change in Leverage Criteria             0     0     0     0     0     0     0   \n",
       "Change in Current Ratio Criteria        0     1     1     1     0     0     0   \n",
       "Number of Shares Criteria               0     0     0     0     0     0     0   \n",
       "Gross Margin Criteria                   0     1     1     1     0     1     1   \n",
       "Asset Turnover Criteria                 0     0     0     0     1     1     0   \n",
       "Piotroski Score                         2     5     5     6     4     6     4   \n",
       "\n",
       "date                                 2013  2014  2015  2016  2017  2018  2019  \\\n",
       "Return on Assets Criteria               1     1     1     1     1     1     1   \n",
       "Operating Cashflow Criteria             1     1     1     1     1     1     1   \n",
       "Change in Return on Assets Criteria     0     1     1     0     1     1     0   \n",
       "Accruals Criteria                       1     1     1     1     1     1     1   \n",
       "Change in Leverage Criteria             0     0     0     0     0     0     0   \n",
       "Change in Current Ratio Criteria        1     0     1     1     0     0     1   \n",
       "Number of Shares Criteria               0     0     0     0     0     0     0   \n",
       "Gross Margin Criteria                   0     1     1     0     0     0     0   \n",
       "Asset Turnover Criteria                 0     0     1     0     0     1     1   \n",
       "Piotroski Score                         4     5     7     4     4     5     5   \n",
       "\n",
       "date                                 2020  2021  2022  2023  2024  \n",
       "Return on Assets Criteria               1     1     1     1     1  \n",
       "Operating Cashflow Criteria             1     1     1     1     1  \n",
       "Change in Return on Assets Criteria     1     1     0     0     0  \n",
       "Accruals Criteria                       1     1     1     1     1  \n",
       "Change in Leverage Criteria             0     0     1     1     1  \n",
       "Change in Current Ratio Criteria        0     0     0     1     0  \n",
       "Number of Shares Criteria               0     0     1     1     1  \n",
       "Gross Margin Criteria                   1     1     1     1     1  \n",
       "Asset Turnover Criteria                 1     1     1     0     1  \n",
       "Piotroski Score                         6     6     7     7     7  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<Axes: title={'center': 'Piotroski Score'}, xlabel='date'>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABLEAAAE8CAYAAAA/qSP1AAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjMsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvZiW1igAAAAlwSFlzAAAPYQAAD2EBqD+naQAAOuhJREFUeJzt3Qd4FOX69/E7hYTQu/SmhG5BBBWkHAMoHBCOICAgoMBBiiAKioUihyYWlKYiJEiRgFIEFVERkN7EI6hEFBCkqdRQQkjmve7n/25ONo0Ekt3Z2e/nupawM7Mzc2ezm9lfnhJgWZYlAAAAAAAAgI0FevsEAAAAAAAAgGshxAIAAAAAAIDtEWIBAAAAAADA9gixAAAAAAAAYHuEWAAAAAAAALA9QiwAAAAAAADYHiEWAAAAAAAAbI8QCwAAAAAAALZHiAUAAAAAAADbI8QCAAA+p0ePHlKxYkXxNQcPHpSAgAB57bXXMtxu7dq1Zjv9CgAAgP9DiAUAAGwjKirKhDeuW+7cuSU8PFwGDBggJ06cyJZjjBs3TpYtWyZO8cMPP0j79u2lQoUK5vtVpkwZadasmUyZMsXbpwYAAJCtgrN3dwAAADfulVdekUqVKsnly5dlw4YNMmPGDPnss89kz549kidPHpk5c6YkJiZed4iloU/btm3Frho1aiSXLl2SkJCQDLfbtGmTNG3aVMqXLy+9e/eWkiVLyuHDh2XLli3y1ltvycCBAz12zgAAADmNEAsAANjOgw8+KHXr1jX/79WrlxQtWlTeeOMNWb58uXTu3Fly5crlkfO4cOGC5M2bVzwtMDDQtKq6lrFjx0rBggVl+/btUqhQIbd1J0+eFE+6ePGiCRgBAAByCt0JAQCA7f3jH/8wXw8cOJDumFgaOD3zzDNSrlw5CQ0NlapVq5qxpyzLStpGuyjqdnPmzEnqsqj7UqNGjTL3f/zxR3n00UelcOHC0rBhQ7Pu6tWrMmbMGLn55pvNvvXYL7zwgsTFxbmdw44dO6RFixZSrFgxCQsLM63JHn/88Qxr0/Pr06ePaXW1ZMmSLI2J9euvv0rNmjVTBViqRIkSqZbNmzdP6tWrZ8ImrU9bfK1evdptm+nTp5t9ap2lS5eW/v37y5kzZ9y2adKkidSqVUt27txp9qH70++H0u/JyJEj5ZZbbjH70Odj2LBhqb5XAAAAWUVLLAAAYHsa1ihtkZVeENSmTRv55ptv5IknnpDbb79dvvjiCxk6dKj88ccf8uabb5rt5s6da1p2aZCjwZHSYCq5Dh06SJUqVUy3Q1cApo/R4Eu7IWpQtnXrVhk/frz89NNPsnTp0qSWT82bN5fixYvL888/b4IlHcjdFUylJSEhwYRc0dHRZj+tWrXK0vdFx8HavHmz6WapoVJGRo8ebYK6e++913TX1NBM61izZo05b6XrdbuIiAh58sknZd++faYrp7b02rhxo1sLuL///tu0mOvUqZN07dpVbrrpJtPFU58H7QKq39/q1aubMbv0+x8TE+OoscgAAIAXWAAAADYRGRmpqZH11VdfWX/++ad1+PBha+HChVbRokWtsLAw68iRI2a77t27WxUqVEh63LJly8zj/vOf/7jtr3379lZAQIC1f//+pGV58+Y1j09p5MiRZh+dO3d2W757926zvFevXm7Ln332WbN8zZo15v7SpUvN/e3bt6db34EDB8w2kyZNsuLj462OHTuaur744gu37b755huznX7NyOrVq62goCBzu+eee6xhw4aZfV25csVtu19++cUKDAy02rVrZyUkJLitS0xMNF9PnjxphYSEWM2bN3fbZurUqeZcZs+enbSscePGZtk777zjtq+5c+ea43z77bduy3U73X7jxo0Z1gMAAJARuhMCAADb0ZZA2qJJu6JpS598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17TL/v37zfEKFSok3uCpmg8ePJjm7+gtW7aIk59nnXvotddek/DwcLNdmTJlZOzYseINnqp71KhRaT7X+p7m5Of6iy++kLvvvtscq3jx4mY/+nPv5JoXLVpk1uk1m37emDRpknhDdtT8/fffS+fOnc01ll5f6nXmW2+9lebv6Tp16pjvyy233CJRUVHi5JqPHTsmjz76qHkPCwwMlMGDB4s3earuJUuWSLNmzcxruUCBAnLPPfeY17iTa96wYYM0aNDA7EO3qVatmrz55pvi9Ne0y8aNG81njmtdt2Uby4e0aNHCioyMtPbs2WPt3r3batmypVW+fHkrNjY2aZu+ffta5cqVs77++mtrx44d1t13323de++9SeuvXr1q1apVy4qIiLC+++4767PPPrOKFStmDR8+3O1Ybdq0serXr299+eWX1oEDB6xNmzZZGzZssJxa85kzZ6xjx44l3Q4fPmwVKVLEGjlypGNr1uczMDDQeuutt6zffvvN+vbbb62aNWta7dq1c2zN06dPt/Lnz28tXLjQ+vXXX60PP/zQypcvn/XJJ5/4ZM1q4MCB1tSpU61u3bpZt912W6rjnD171rrpppusLl26mGNpzWFhYda7775rObVm3Z/u57333jPHfOihhyxv8lTdY8eOtV566SVr48aN1v79+63Jkyeb1/iKFSssp9asr+PZs2ebYxw8eNBavny5VaJEiVS/05xUs8uVK1esunXrWg8++KBVsGBByxs8VbNeh+gl21dffeX2u1q/B05+nnWbqlWrmp9r/T2t+1q9erXlDZ6q+/z5827Psd5q1Khhde/e3XJqzfrchoaGmvctfe/euXOn1ahRI+uOO+6wnFqzXqMFBwdbM2bMMO/jK1eutEqVKmVNmTLF8sWaZ82aZT311FPW2rVrTT1z584111rJ69HnOU+ePNaQIUOsH3/80awLCgqyVq1a5dia9b1bt5kzZ451++23W4MGDbK8yVN1a50TJ060tm3bZsXExJjXdq5cuaxdu3Y5tmatbcGCBeY4+rzrNvrz7qufN2ZlomaX06dPW5UrV7aaN2+e4XVbdvKpECulkydPmou6devWJQUx+gJZvHhx0jY//fST2Wbz5s1JvzT0Q83x48eTttFfIAUKFLDi4uLM/c8//9xcEP/999+Wv9Sc0tKlS62AgADzocipNU+aNMm84JJ7++23rTJlylhOrfmee+6xnn32Wbdj6cVEgwYNLF+sOTkNXNN649TgrnDhwm4/688995z5YOTUmpPTDz7eDrG8UbeL/uLu2bOn5U81P/3001bDhg0tp9c8bNgwq2vXruZCzVshlqdqdoVY+gcKu8mpmvVDrn7I//nnny078tRrWj+A6D7Wr19vObVmfbw+1wkJCUnL9I9reh3qjaDWEzV37tzZat++fapr0LJly1qJiYmWL9fs0q9fP6tp06Zu79n6x+LkOnbsaD5we1tO1Zxc48aNvR5ieaNuFw3jR48ebflTzdowQq9TnF5zx44dzR+Rs3KteqN8qjthSmfPnjVfixQpYr7u3LnTdKGIiIhI2kab8pUvX142b95s7utX7WKjXS9cWrRoIefOnZO9e/ea+5988onUrVvXdDnSpuvaBPTZZ5+VS5cuiVNrTmnWrFlmn9q82ak1a9PWw4cPy2effWa6LGgTyo8++khatmwpTq1Zu8lql6PktInotm3bvNL96EZrzgzdtlGjRhISEuL2fdFmtadPnxYn1mx3nqxbj+U6jj/UrN3rVq1aJY0bNxYn17xmzRpZvHix6R5tJzn9PLdp08Z0DWjYsKG5VnFyzStWrDDdY1euXCmVKlUywzr06tVLTp06JXbgqdf0+++/b65DtUu8U2vWbnfa1SoyMlISEhLMcebOnWv2mytXLnFizeldjx05ckQOHTokTqg55e9f3Tb5PlzXY3a4vsmpmu3OU3UnJibK+fPnbfG98VTN3333nWzatMlR12Nn06hZ37d/++03GTlypHiSz4ZY+mLQfsXa97RWrVpm2fHjx80H1ZRjY+iHel3n2ib5h3zXetc6pU+E9mvds2ePLF26VCZPnmzCjX79+olTa07u6NGj8vnnn5uLRW/LyZp1nzpeTseOHc3+SpYsKQULFvT6h6KcrFkvFvSCWN+8NLjbsWOHua9vZH/99Zf4Ws2ZkdWffyfUbGeerFvHG9m+fbv07NlTnF7zvffeaz4QValSxXzYfeWVV8SpNeu4hTrmm46lomNt2EVO1qzjVbz++usmuPv0009Ni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RMw6eqVasm3d+5c6eMGjXKtMTSoEq7Carff/9datSokeZ+9+/fb8KqZs2auS3XY91xxx05Vg8AAIBdEWIBAADk8HhZLVq0MLf58+dL8eLFTXil9zWQyqiFl/r000+lTJkybutCQ0Nz/LwBAADshhALAADgBtx8882SK1cu2bp1q5QvX94s09ZWMTEx0rhxY/n555/l77//lgkTJpjxr1zdCZMLCQkxXxMSEpKWaQstDas08NL9AAAA+DtCLAAAgBugY1o98cQTZnB3HRurRIkS8uKLL0pg4P/Nn6PBloZUU6ZMkb59+8qePXvMIO/JVahQwcxKuHLlSmnZsqWZiVBnMnz22WfNYO7a/bBhw4Zy9uxZ2bhxoxQoUEC6d+/upYoBAAC8g9kJAQAAbtCkSZPkvvvuk9atW0tERIQJnO68806zTrsPRkVFyeLFi03rKm2R9dprr7k9XrsLjh49Wp5//nm56aabZMCAAWa5hl0vv/yymaWwevXq8sADD5juhZUqVfJKnQAAAN7E7IQAAAAAAACwPVpiAQAAAAAAwPYIsQAAAAAAAGB7hFgAAAAAAACwPUIsAAAAAAAA2B4hFgAAAAAAAGyPEAsAAAAAAAC2R4gFAAAAAAAA2yPEAgAAAAAAgO0RYgEAAAAAAMD2CLEAAAAAAABge4RYAAAAAAAAELv7f/Ro3zq1bbgoAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 1500x300 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(companies.models.get_altman_z_score().loc[\"AMZN\"])\n",
    "\n",
    "display(companies.models.get_piotroski_score().loc[\"AAPL\"])\n",
    "\n",
    "companies.models.get_piotroski_score().loc[:, \"Piotroski Score\", :].T.plot.bar(\n",
    "    figsize=(15, 3), rot=0, title=\"Piotroski Score\", colormap=\"tab20c\", ylim=(0, 9)\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "de6a8c66",
   "metadata": {},
   "source": [
    "It is also possible to directly call the models that are part of the Models module. For example, The Dupont analysis functionality was filled with actual data from Apple and therefore it returns the results that closely match their actual metrics given the reporting dates in October."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "2958e7ad",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>2018</th>\n",
       "      <th>2019</th>\n",
       "      <th>2020</th>\n",
       "      <th>2021</th>\n",
       "      <th>2022</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Net Profit Margin</th>\n",
       "      <td>0.22414202074587247</td>\n",
       "      <td>0.21238094505984456</td>\n",
       "      <td>0.20913611278072236</td>\n",
       "      <td>0.2588179335569424</td>\n",
       "      <td>0.2530964070519973</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Asset Turnover</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.711392439674619</td>\n",
       "      <td>0.81093655839015</td>\n",
       "      <td>1.1294552437879761</td>\n",
       "      <td>1.1234351941014582</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Equity Multiplier</th>\n",
       "      <td>NaN</td>\n",
       "      <td>3.4133013523477094</td>\n",
       "      <td>3.7410043320661304</td>\n",
       "      <td>4.957039440456695</td>\n",
       "      <td>5.563512442542399</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Return on Equity</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.5157027261612551</td>\n",
       "      <td>0.6344598178764036</td>\n",
       "      <td>1.4490579898682256</td>\n",
       "      <td>1.5819147249960375</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                 2018                2019                2020  \\\n",
       "Net Profit Margin 0.22414202074587247 0.21238094505984456 0.20913611278072236   \n",
       "Asset Turnover                    NaN   0.711392439674619    0.81093655839015   \n",
       "Equity Multiplier                 NaN  3.4133013523477094  3.7410043320661304   \n",
       "Return on Equity                  NaN  0.5157027261612551  0.6344598178764036   \n",
       "\n",
       "                                2021               2022  \n",
       "Net Profit Margin 0.2588179335569424 0.2530964070519973  \n",
       "Asset Turnover    1.1294552437879761 1.1234351941014582  \n",
       "Equity Multiplier  4.957039440456695  5.563512442542399  \n",
       "Return on Equity  1.4490579898682256 1.5819147249960375  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from financetoolkit.models import dupont_model\n",
    "\n",
    "years = [2018, 2019, 2020, 2021, 2022]\n",
    "\n",
    "dupont_model.get_dupont_analysis(\n",
    "    net_income=pd.Series(\n",
    "        [59531000000, 55256000000, 57411000000, 94680000000, 99803000000], index=years\n",
    "    ),\n",
    "    total_revenue=pd.Series(\n",
    "        [265595000000, 260174000000, 274515000000, 365817000000, 394328000000],\n",
    "        index=years,\n",
    "    ),\n",
    "    average_total_assets=pd.Series(\n",
    "        [np.nan, 365725000000, 338516000000, 323888000000, 351002000000],\n",
    "        index=years,\n",
    "    ),\n",
    "    average_total_equity=pd.Series(\n",
    "        [np.nan, 107147000000, 90488000000, 65339000000, 63090000000], index=years\n",
    "    ),\n",
    ")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "financetoolkit-rvLLqrVB-py3.12",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
